package graph;

public class Trangle extends Graph {
    public int d;
    public int h;

    public Trangle() {
    }

    public Trangle(int d, int h) {
        this.d = d;
        this.h = h;
    }

    // 获取面积
    public void getArea() {
        System.out.println("三角形面积：" + (this.d * this.h / 2));
    }

}
